package com.sg.dto.integration.finance;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @desc AccountCapitalSourceDto
 * @使用场景
 */
@Data
public class AccountCapitalSourceDto extends BaseDto implements Serializable {

    /**
     * 资金来源ID
     */
    @ApiModelProperty("资金来源ID")
    private String capitalSourceId;

    /**
     * 资金来源logo
     */
    @ApiModelProperty("资金来源logo")
    private String capitalSourceLogo;

    /**
     * 资金来源名称
     */
    @ApiModelProperty("资金来源名称")
    private String capitalSourceName;

    /**
     * 资金来源标识
     */
    @ApiModelProperty("资金来源标识")
    private String capitalSourceCode;

    /**
     * 操作时间
     */
    @ApiModelProperty("操作时间")
    private Date operateTime;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    private Date createTime;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        AccountCapitalSourceDto that = (AccountCapitalSourceDto) o;
        return (
                capitalSourceId == that.capitalSourceId &&
                        capitalSourceLogo == that.capitalSourceLogo &&
                        capitalSourceName == that.capitalSourceName &&
                        capitalSourceCode == that.capitalSourceCode &&
                        operateTime == that.operateTime &&
                        createTime == that.createTime
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                capitalSourceId,
                capitalSourceLogo,
                capitalSourceName,
                capitalSourceCode,
                operateTime,
                createTime
        );
    }

}
